﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Labs
{
    class Program
    {
        static void Main(string[] args)l
        {
            string rab = Console.ReadLine();
            double r = double.Parse(rab.Split(' ')[0]);
            double a = double.Parse(rab.Split(' ')[1]);
            double b = double.Parse(rab.Split(' ')[2]);

            string coords = Console.ReadLine();
            double x = double.Parse(coords.Split(' ')[0]);
            double y = double.Parse(coords.Split(' ')[1]);

            Console.WriteLine(
                ((Math.Abs(x) <= a && Math.Abs(y) <= b) &&
                    (
                        InCircle(x, y, 0, 0, r) && x <= 0 && y <=0 ||
                        OutCircle(x, y, 0, 0, r) && x >=0 && y >= 0
                    )
                ).ToString()
            );
        }

        static bool InCircle(double x, double y, double xCenter, double yCenter, double r)
        {
            return (Math.Pow(x - xCenter, 2) + Math.Pow(y - yCenter, 2) <= Math.Pow(r, 2));
        }

        static bool OutCircle(double x, double y, double xCenter, double yCenter, double r)
        {
            return (Math.Pow(x - xCenter, 2) + Math.Pow(y - yCenter, 2) > Math.Pow(r, 2));
        }
    }
}
